package adv324;

/**
 * @author oldliu
 * @since 1.0
 */
public class Rewar {
    public static void main(String[] args) {
        String str="胡汪洋.rar";
        if(str.endsWith(".rar")||str.endsWith(".zip")){
            String f=str.substring(0,str.length()-4);
            char[] cr = f.toCharArray();
            boolean hefa=true;
            for (char c:cr ) {
                if(c<0x4e00||c>0x9fa5){
                    hefa=false;
                    break;
                }
            }
        }
        System.out.println(str.matches("[\u4e00-\u9fa5]+\\.(rar|zip)"));
    }
}
